real-time encoding